<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      <link rel="shortcut icon" href="../../../img/favicon.ico" />
    <title>Viewing diagnostic logs - DISMTools Help Documentation</title>
    <link rel="stylesheet" href="../../../css/theme.css" />
    <link rel="stylesheet" href="../../../css/theme_extra.css" />
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css" />
    
      <script>
        // Current page data
        var mkdocs_page_name = "Viewing diagnostic logs";
        var mkdocs_page_input_path = "img_tasks\\exttools\\dynaviewer.md";
        var mkdocs_page_url = null;
      </script>
    
    <!--[if lt IE 9]>
      <script src="../../../js/html5shiv.min.js"></script>
    <![endif]-->
      <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
      <script>hljs.highlightAll();</script> 
</head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
    <div class="wy-side-scroll">
      <div class="wy-side-nav-search">
          <a href="../../..">
          <img src="../../../logo.png" class="logo" alt="Logo"/>
        </a><div role="search">
  <form id ="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
      <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" title="Type search term here" />
  </form>
</div>
      </div>

      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <ul>
                <li class="toctree-l1"><a class="reference internal" href="../../..">Home</a>
                </li>
              </ul>
              <ul>
                <li class="toctree-l1"><a class="reference internal" href="../../../getting_started/start/">Getting started</a>
                </li>
              </ul>
              <ul>
                <li class="toctree-l1"><a class="reference internal" href="../../../whats_new/highlights/">What's new</a>
                </li>
              </ul>
              <p class="caption"><span class="caption-text">Image tasks</span></p>
              <ul>
                  <li class="toctree-l1"><a class="reference internal" href="../../img_tasks/">Overview</a>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" href="../../online_inst_mgmt/">Online installation management mode</a>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" href="../../offline_inst_mgmt/">Offline installation management mode</a>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" >Image management</a>
    <ul>
                <li class="toctree-l2"><a class="reference internal" href="../../mgmt/append_image/">Appending to an image</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../mgmt/apply_image/">Applying an image</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../mgmt/capture_image/">Capturing an image</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../mgmt/delete_image/">Removing volume images from an image file</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../mgmt/export_image/">Exporting a Windows image</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../mgmt/list_image/">Listing the contents of Windows images</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../mgmt/mount_image/">Mounting an image</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../mgmt/remount_image/">Remounting an image</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../mgmt/split_image/">Splitting an image</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../mgmt/unmount_image/">Unmounting an image</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" >Image information dialogs</a>
    <ul>
                <li class="toctree-l3"><a class="reference internal" href="../../info/infodlgs/">Overview</a>
                </li>
                <li class="toctree-l3"><a class="reference internal" href="../../info/img_info/">Image file information</a>
                </li>
                <li class="toctree-l3"><a class="reference internal" href="../../info/pkg_info/">Package information</a>
                </li>
                <li class="toctree-l3"><a class="reference internal" href="../../info/feat_info/">Feature information</a>
                </li>
                <li class="toctree-l3"><a class="reference internal" href="../../info/appxpkg_info/">AppX package information</a>
                </li>
                <li class="toctree-l3"><a class="reference internal" href="../../info/cap_info/">Capability information</a>
                </li>
                <li class="toctree-l3"><a class="reference internal" href="../../info/drv_info/">Driver information</a>
                </li>
                <li class="toctree-l3"><a class="reference internal" href="../../info/winpe_info/">Windows PE configuration information</a>
                </li>
    </ul>
                </li>
    </ul>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" >OS packages</a>
    <ul>
                <li class="toctree-l2"><a class="reference internal" href="../../packages/pkgs/">Overview</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../packages/add_package/">Adding packages</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../packages/remove_package/">Removing packages</a>
                </li>
    </ul>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" >Features</a>
    <ul>
                <li class="toctree-l2"><a class="reference internal" href="../../features/features/">Overview</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../features/enable_feature/">Enabling features</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../features/disable_feature/">Disabling features</a>
                </li>
    </ul>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" >AppX packages</a>
    <ul>
                <li class="toctree-l2"><a class="reference internal" href="../../appx/appx/">Overview</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../appx/add_provisionedappxpackage/">Adding AppX packages</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../appx/remove_provisionedappxpackage/">Removing AppX packages</a>
                </li>
    </ul>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" >Edition servicing</a>
    <ul>
                <li class="toctree-l2"><a class="reference internal" href="../../editions/editions/">Overview</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../editions/set_edition/">Upgrading an image to a higher edition</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../editions/set_productkey/">Setting the product key</a>
                </li>
    </ul>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" >Languages and regional servicing</a>
    <ul>
                <li class="toctree-l2"><a class="reference internal" href="../../langs/set_layereddriver/">Setting keyboard layered drivers</a>
                </li>
    </ul>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" >Capabilities</a>
    <ul>
                <li class="toctree-l2"><a class="reference internal" href="../../capabilities/caps/">Overview</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../capabilities/add_capability/">Adding capabilities</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../capabilities/remove_capability/">Removing capabilities</a>
                </li>
    </ul>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" >Drivers</a>
    <ul>
                <li class="toctree-l2"><a class="reference internal" href="../../drivers/drvs/">Overview</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../drivers/add_driver/">Adding drivers</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../drivers/export_driver/">Exporting drivers</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../drivers/import_driver/">Importing drivers</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../drivers/remove_driver/">Removing drivers</a>
                </li>
    </ul>
                  </li>
              </ul>
              <p class="caption"><span class="caption-text">Tools</span></p>
              <ul class="current">
                  <li class="toctree-l1"><a class="reference internal" href="../../tools/mimgmgr/">Mounted image manager</a>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" href="../../tools/wim2esd/">Image conversion</a>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" href="../../tools/swm2wim/">SWM file merger</a>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" href="../../tools/configlisteditor/">DISM Configuration List Editor</a>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" >ISO creation tools</a>
    <ul>
                <li class="toctree-l2"><a class="reference internal" href="../../tools/isocreator/">Overview</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../tools/isocreator/isocreate/">Creating ISO files</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" >Installing the operating system</a>
    <ul>
                <li class="toctree-l3"><a class="reference internal" href="../../tools/isocreator/install/localinstall/">Local installations</a>
                </li>
                <li class="toctree-l3"><a class="reference internal" >Network-based installations</a>
    <ul>
                <li class="toctree-l4"><a class="reference internal" href="../../tools/isocreator/install/netinst/pxehelpers/">Overview</a>
                </li>
                <li class="toctree-l4"><a class="reference internal" href="../../tools/isocreator/install/netinst/setup/">Creating a basic network setup (Hyper-V)</a>
                </li>
                <li class="toctree-l4"><a class="reference internal" href="../../tools/isocreator/install/netinst/wds/">Windows Deployment Services (WDS) Helper</a>
                </li>
    </ul>
                </li>
                <li class="toctree-l3"><a class="reference internal" >External Tools</a>
    <ul>
                <li class="toctree-l4"><a class="reference internal" href="../../tools/isocreator/exttools/dim/">Driver Installation Module</a>
                </li>
                <li class="toctree-l4"><a class="reference internal" href="../../tools/isocreator/exttools/dtpe_es/">Extensibility Suite</a>
                </li>
                <li class="toctree-l4"><a class="reference internal" href="../../tools/isocreator/exttools/sysprep/">SysPrep Preparation Tool</a>
                </li>
    </ul>
                </li>
                <li class="toctree-l3"><a class="reference internal" >Command-line</a>
    <ul>
                <li class="toctree-l4"><a class="reference internal" href="../../tools/isocreator/cmdline/cmdline/">Overview</a>
                </li>
                <li class="toctree-l4"><a class="reference internal" href="../../tools/isocreator/cmdline/scriptref/">Administration Script Reference</a>
                </li>
    </ul>
                </li>
    </ul>
                </li>
    </ul>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" href="../../tools/regcpl/">Image registry control panel</a>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" href="../../tools/servicemgr/">System service manager</a>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" href="../../tools/envvarmgr/">System environment variable manager</a>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" >Unattended answer files</a>
    <ul>
                <li class="toctree-l2"><a class="reference internal" href="../../unattend/unattend/">Overview</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../unattend/unatt_man/">Unattended answer file manager</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../unattend/unatt_create/">Unattended answer file creator</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../unattend/unatt_apply/">Applying unattended answer files</a>
                </li>
    </ul>
                  </li>
                  <li class="toctree-l1 current"><a class="reference internal current" >External tools</a>
    <ul class="current">
                <li class="toctree-l2"><a class="reference internal" href="../themedesigner/">Creating your themes</a>
                </li>
                <li class="toctree-l2 current"><a class="reference internal current" href="#">Viewing diagnostic logs</a>
    <ul class="current">
    <li class="toctree-l3"><a class="reference internal" href="#usage">Usage</a>
    </li>
    <li class="toctree-l3"><a class="reference internal" href="#running-on-older-versions-of-windows">Running on older versions of Windows</a>
    </li>
    <li class="toctree-l3"><a class="reference internal" href="#command-line-usage">Command line usage</a>
        <ul>
    <li class="toctree-l4"><a class="reference internal" href="#options">Options</a>
    </li>
        </ul>
    </li>
    <li class="toctree-l3"><a class="reference internal" href="#dynalog-logging">DynaLog Logging</a>
        <ul>
    <li class="toctree-l4"><a class="reference internal" href="#format-version-history">Format Version History</a>
    </li>
        </ul>
    </li>
    </ul>
                </li>
    </ul>
                  </li>
              </ul>
      </div>
    </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
      <nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../..">DISMTools Help Documentation</a>
        
      </nav>
      <div class="wy-nav-content">
        <div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="../../.." class="icon icon-home" aria-label="Docs"></a></li>
          <li class="breadcrumb-item">Tools</li>
          <li class="breadcrumb-item">External tools</li>
      <li class="breadcrumb-item active">Viewing diagnostic logs</li>
    <li class="wy-breadcrumbs-aside">
    </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div class="section" itemprop="articleBody">
              
                <h1 id="the-dynalog-log-viewer">The DynaLog Log Viewer</h1>
<p>The DynaLog Log Viewer (<em>DynaViewer</em>) is a tool that allows you to view and analyze diagnostic logs generated by DISMTools. It can be accessed from one of the following locations:</p>
<ul>
<li>By going to <strong>Help &gt; Open diagnostic logs in log viewer</strong></li>
<li>Independently, by opening <code>DynaViewer.exe</code> located in <code>&lt;program directory&gt;\tools\DynaLogViewer</code></li>
</ul>
<p>You should see the following window:</p>
<p align="center">
    <img src="../../../res/img_tasks/exttools/dynaviewer/DynaViewer.png" />
</p>

<h2 id="usage">Usage</h2>
<p>When you launch the DynaLog Log Viewer, you will be able to open a log file. Use the "Open" button on the window to select a log file to view.</p>
<p>The main log file is <code>DT_DynaLog.log</code>. DynaLog will back up log files that are older than 2 weeks. Both the main log file and the backups are located in <code>&lt;program directory&gt;\logs</code>.</p>
<p>You can also invoke the DynaLog Log Viewer from the command line. More about that in the <a href="#command-line-usage">Command line usage</a> section.</p>
<p>After the log file is loaded, you can get the following information:</p>
<ul>
<li><strong>Timestamps of each log entry in UTC</strong></li>
<li><strong>Process ID</strong> to help tell multiple processes apart</li>
<li><strong>Main/Parent Method Callers</strong></li>
<li><strong>Message</strong> that contains what happened</li>
</ul>
<p>You can get more information about each entry by double-clicking it. This will open a new window with the following information:</p>
<p align="center">
    <img src="../../../res/img_tasks/exttools/dynaviewer/DynaViewer_EventProps.png" />
</p>

<p>If the file was externally modified, you can refresh the log file by clicking the "Refresh" button.</p>
<p>It's recommended that you use the DynaLog Log Viewer in the event of a problem. In the case of an internal program error, DISMTools will attempt to copy the latest log file to your desktop. DynaLog log files are recommended to be sent to us to help us diagnose the issue even further.</p>
<p>DynaLog Log Viewer can also be used to view logs from other programs that use the DynaLog logging framework, that can easily be implemented in your preferred programming language.</p>
<h2 id="running-on-older-versions-of-windows">Running on older versions of Windows</h2>
<p>DISMTools includes 2 versions of the Log Viewer that contain the same feature set but target different frameworks:</p>
<ul>
<li>The main version targets .NET 4.8 and works on Windows 7 SP1 and later (except Windows 10 1507/1511). The source code of this version is available on the GitHub repository</li>
<li>An alternative version targets .NET 2 and works on operating systems as old as Windows 98 Second Edition. The source code of this version is available as a ZIP file in the repository</li>
</ul>
<h2 id="command-line-usage">Command line usage</h2>
<p>The command line arguments of the DynaLog Log Viewer are as follows:</p>
<pre><code>DynaViewer.exe &quot;file&quot; [options]
</code></pre>
<h3 id="options">Options</h3>
<ul>
<li><code>/selectfirst=&lt;n&gt;</code> - Selects the first <em>n</em> entries of the log file</li>
<li><code>/selectlast=&lt;n&gt;</code> - Selects the last <em>n</em> entries of the log file. In the event of an internal error, DISMTools will use this option to select enough entries to include error information and the last entries before it</li>
</ul>
<h2 id="dynalog-logging">DynaLog Logging</h2>
<p>In DynaLog, an event includes the following information:</p>
<pre><code>[Timestamp] [Process ID] [Main Method Caller (Parent Method)] Message
</code></pre>
<p>In the DISMTools repository, you can find the source code of DynaLog. Then, you can port it to your preferred language. The DynaLog logging format may change in the future, so it is recommended that you adapt your reporting code to work correctly with the Log Viewer when it parses new items.</p>
<p>To log an event, call the <code>LogMessage</code> method like this:</p>
<pre><code class="language-csharp">DynaLog.LogMessage(&quot;This is a log message&quot;);
</code></pre>
<p>The parent method can be explicitly ignored in the event by setting the second parameter in <code>LogMessage</code> to <code>false</code>:</p>
<pre><code class="language-csharp">DynaLog.LogMessage(&quot;This is a log message with parent ignored&quot;, false);
</code></pre>
<p>DynaLog can also be temporarily disabled by calling <code>DisableLogging</code> and re-enabled by calling <code>EnableLogging</code>. Use or present this option to the end-user only if the system is experiencing performance issues.</p>
<h3 id="format-version-history">Format Version History</h3>
<table>
<thead>
<tr>
<th style="text-align: center;">Version</th>
<th style="text-align: center;">Used by DISMTools versions</th>
<th>Changes</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">1.0.2</td>
<td style="text-align: center;">0.7 Preview 5+, 0.6.2 Update 2+</td>
<td>Added process ID (PID) field</td>
</tr>
<tr>
<td style="text-align: center;">1.0.1</td>
<td style="text-align: center;">0.7 Preview 1 - Preview 4, 0.6.2 Update 1</td>
<td>Invariant culture for date representations, DynaViewer added</td>
</tr>
<tr>
<td style="text-align: center;">1.0</td>
<td style="text-align: center;">0.6.1 - 0.6.2 (Release)</td>
<td>Logging added to entire codebase, write speeds improved from previous version</td>
</tr>
<tr>
<td style="text-align: center;">0.6</td>
<td style="text-align: center;">0.6</td>
<td>Initial version to implement the foundations; not used in many places</td>
</tr>
</tbody>
</table>
              
            </div>
          </div><footer>

  <hr/>

  <div role="contentinfo">
    <!-- Copyright etc -->
  </div>

  Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
          
        </div>
      </div>

    </section>

  </div>

  <div class="rst-versions" role="note" aria-label="Versions">
  <span class="rst-current-version" data-toggle="rst-current-version">
    
    
      <span><a href="../themedesigner/" style="color: #fcfcfc">&laquo; Previous</a></span>
    
    
  </span>
</div>
    <script src="../../../js/jquery-3.6.0.min.js"></script>
    <script>var base_url = "../../..";</script>
    <script src="../../../js/theme_extra.js"></script>
    <script src="../../../js/theme.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
      <script src="../../../search/main.js"></script>
    <script>
        jQuery(function () {
            SphinxRtdTheme.Navigation.enable(false);
        });
    </script>

</body>
</html>
